<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">
    <body>
        <ui:composition template="../templates/default3.xhtml">

            <ui:define name="content">
                <h:form id="addRole" binding="#{roleManagerBean.loadAddRole}">

                    <p:panel id="roleInfo" header ="Role Information"> 
                        <font class="fieldNote">* - Mandatory Field</font>
                        <p:messages/>
                        <table class="panel" border="0">
                            <tr>
                                <td>
                                    Role title
                                </td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <p:inputText required="true" id="role" requiredMessage="Role Title Required" value="#{roleManagerBean.roleType}"> 
                                                </p:inputText>
                                            </td>      
                                            <td>    <font class="fieldNote">*</font>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr> 
                                <td>
                                    Role description</td>

                                <br></br>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <p:inputTextarea required="true" id="description" requiredMessage="Role Description Required" style="width:300px;height:100px;" effectDuration="400" value="#{roleManagerBean.description}">    
                                                </p:inputTextarea>
                                            </td>
                                            <td>    <font class="fieldNote">*</font>
                                            </td>
                                        </tr>
                                    </table>
                                </td>

                            </tr>

                            <tr>
                                <td class="btn" colspan="3"><hr/>
                                    <p:commandButton id="btnAdd" value="Add" actionListener="#{roleManagerBean.addNewRole}" update="addRole" ajax="true"/>
                                </td>
                            </tr>
                        </table>
                        <br/>
                        <br/>
                        <br/>
                        <br/>
                        <br/>
                        <br/>
                        <br/>
                        <br/>
                        <br/>
                        <br/>
                    </p:panel>
                </h:form>
            </ui:define>        
        </ui:composition>
    </body>
</html>